package org.biubiu0002.baiblog.core.controller;

import com.baomidou.mybatisplus.core.toolkit.IdWorker;
import org.biubiu0002.baiblog.common.utils.R;
import org.biubiu0002.baiblog.core.annotations.PermissionIgnore;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * id生成器
 * @Author: biubiu0002
 * @Date: 2022/12/21 1:37
 **/
@RestController
@RequestMapping("/id")
public class IdController {
    @GetMapping
    @PermissionIgnore
    public R getId(){
        return R.ok().put("data", IdWorker.getId());
    }
}
